package com.adu.springbootdemo.Interceptor;

import org.springframework.web.servlet.HandlerInterceptor;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * 自定义拦截器
 */
public class IpInterceptor implements HandlerInterceptor{
    @Override
    public boolean preHandle(HttpServletRequest request, HttpServletResponse response,Object obj){
        System.out.println("进入拦截器");
        // 返回true，继续下一步执行，false，拒绝进行下一步操作
        return true;
    }

}
